package top.lyf1210.yuwenpicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import top.lyf1210.yuwenpicturebackend.model.Space;
import com.baomidou.mybatisplus.extension.service.IService;
import top.lyf1210.yuwenpicturebackend.model.User;
import top.lyf1210.yuwenpicturebackend.model.dto.space.SpaceAddRequest;
import top.lyf1210.yuwenpicturebackend.model.dto.space.SpaceQueryRequest;
import top.lyf1210.yuwenpicturebackend.model.vo.space.SpaceVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 钰玟
* @description 针对表【t_space(空间)】的数据库操作Service
* @createDate 2025-05-13 14:13:12
*/
public interface SpaceService extends IService<Space> {




    void validSpace(Space space,boolean isAdd);

    void fillSpaceWithSpaceLevel(Space space);

    long addSpace(SpaceAddRequest spaceAddRequest , User loginUser);

    /**
     * 删除空间
     * @param id id
     */
    void deleteSpace(Long id);

    QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);

    Page<SpaceVO> getPictureVOPage(Page<Space> page, HttpServletRequest request);

    void checkSpaceAuth(Space spaceById, User loginUser);

    SpaceVO getSpaceVO(Space space, HttpServletRequest request);
}
